<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    <link type="text/css" href="<c:url value="css/user/userCommon.css"/>" rel="stylesheet" />
	<link type="text/css" href="<c:url value="css/user/userLeftContent.css"/>" rel="stylesheet" />
	<link type="text/css" href="<c:url value="css/user/userSocialNetwork.css"/>" rel="stylesheet" />
	<script type="text/javascript" src="<c:url value="/js/user/leftmenu.js" />" charset="utf-8"></script>
	<script type="text/javascript" src="<c:url value="/js/user/clock.js" />" charset="utf-8"></script>
	<script type="text/javascript" src="<c:url value="/js/user/showdiv.js" />" charset="utf-8"></script>

	<script type="text/javascript" src="<c:url value="/js/user/userSocialNetworkValidation.js" />" charset="utf-8"></script>
	<%@include file="/jsp/common/jspCommonHeadSetting.jsp"%>
	<title>network</title>
  </head>
  
  <body>
<div>
	<div id="showbgdiv" style="display: none;z-index: 9996">
		<div id="showdiv" style="display: none;text-align: center;z-index: 9997">
			<div id="bacontent" style="display: none;z-index: 9998">
			<s:form cssClass="form" action="/user/showBA.action" namespace="/" onsubmit="return baCommit('tx_banum','tx_banew');" target="network">
				<p id="p">
					<span class="span_label">规  模：</span>
					<span class="span_text"><input id="tx_banum"  type="text"  onblur="checkNum('tx_banum')"/></span>
					<ul><label id="banum_error" class="error_ul"> </label> </ul>
				</p>
				<p id="p">
					<span class="span_label">新节点连边数：</span>
					<span class="span_text"><input id="tx_banew"  type="text" onblur="checkEdge('tx_banew')"/></span>
					<ul><label id="baedge_error" class="error_ul"> </label> </ul>
					
				</p>
				<span class="span_text">
				<input name="btn_submit" type="submit" id="btn_submit"  value="确定"/></input>
				</span>
				<span class="span_text">
				<input type="button" id="btn_return" value="返回" onclick="Close()"/></input>
				</span>
			</s:form>
			</div>
			<div id="ercontent" style="display: none;z-index: 9998">
			<s:form cssClass="form" action="/user/showER.action" namespace="/" onsubmit="return erCommit('tx_ernum','tx_erpos');" target="network">
				<p id="p">
					<span class="span_label">规  模：</span>
					<span class="span_text"><input id="tx_ernum"  type="text"  onblur="checkNum('tx_ernum')"/></span>
					<ul><label id="ernum_error" class="error_ul"> </label> </ul>
				</p>
				<p id="p">
					<span class="span_label">连边概率：</span>
					<span class="span_text">
					<input id="tx_erpos"  type="text" onblur = "checkPos('tx_erpos')" /></span>
					<ul><label id="erpos_error" class="error_ul"> </label> </ul>
				</p>
				<span class="span_text">
				<input name="btn_submit" type="submit" id="btn_submit"  value="确定" /></input>
				</span>
				<span class="span_text">
				<input type="button" id="btn_return" value="返回" onclick="Close()"/></input>
				</span>
			</s:form>
			</div>
			<div id="swbcontent" style="display: none;z-index: 9998">
			<s:form cssClass="form" action="/user/showSWB.action" namespace="/" onsubmit="return baCommit('tx_swbnum','tx_swbedge');" target="network">
			    <p id="p">
					<span class="span_label">规  模：</span>
					<span class="span_text">
					<input id="tx_swbnum"  type="text"  onblur="checkNum('tx_swbnum')"/></span>
					<ul><label id="swbnum_error" class="error_ul"> </label> </ul>
			    </p>
				<p id="p">
					<span class="span_label">连边数：</span>
					<span class="span_text">
					<input id="tx_swbedge"  type="text" onblur="checkEdge('tx_swbedge')"/></span>
					<ul><label id="swbedge_error" class="error_ul"> </label> </ul>
				</p>
				<span class="span_text">
				<input name="btn_submit" type="submit" id="btn_submit"  value="确定" /></input>
				</span>
				<span class="span_text">
				<input type="button" id="btn_return" value="返回" onclick="Close()"/></input>
				</span>
			</s:form>
			</div>
			<div id="bbvcontent" style="display: none;z-index: 9998">
			<s:form cssClass="form" action="/user/showBBV.action" namespace="/" onsubmit="return baCommit('tx_bbvnum','tx_bbvnew');" target="network">
			    <p id="p">
					<span class="span_label">规  模：</span>
					<span class="span_text">
					<input id="tx_bbvnum"  type="text" onblur="checkNum('tx_bbvnum')" /></span>
					<ul><label id="bbvnum_error" class="error_ul"> </label> </ul>
				</p>
				<p id="p">
					<span class="span_label">新节点连边数：</span>
					<span class="span_text">
					<input id="tx_bbvnew"  type="text" onblur="checkEdge('tx_bbvnew')"/></span>
					<ul><label id="bbvedge_error" class="error_ul"> </label> </ul>
				</p>
				<span class="span_text">
				<input name="btn_submit" type="submit" id="btn_submit"  value="确定" /></input>
				</span>
				<span class="span_text">
				<input type="button" id="btn_return" value="返回" onclick="Close()" /></input>
				</span>
			</s:form>
			</div>
			<div id="wscontent" style="display: none;z-index: 9998">
			<s:form cssClass="form" action="/user/showWS.action" namespace="/" onsubmit="return wsCommit('tx_wsnum','tx_wsrepos','tx_wsnext');"  target="network">
			    <p id="p">
					<span class="span_label">规  模：</span>
					<span class="span_text">
					<input id="tx_wsnum"  type="text" onblur="checkNum('tx_wsnum')"/></span>
					<ul><label id="wsnum_error" class="error_ul"> </label> </ul>
				</p>
				<p id="p">
					<span class="span_label">重连概率：</span>
					<span class="span_text">
					<input id="tx_wsrepos"  type="text" onblur="checkPos('tx_wsrepos')"/></span>
					<ul><label id="wspos_error" class="error_ul"> </label> </ul>
				</p>
					<p id="p">
					<span class="span_label">最近邻连接点数：</span>
					<span class="span_text">
					<input id="tx_wsnext"  type="text" onblur="checkNext('tx_wsnext')"/></span>
					<ul><label id="wsnext_error" class="error_ul"> </label> </ul>
				</p>
				<span class="span_text">
				<input name="btn_submit" type="submit" id="btn_submit" value="确定"  /></input>
				</span>
				<span class="span_text">
				<input type="button" id="btn_return" value="返回" onclick="Close()" /></input>
				</span>
			</s:form>
			</div>
		</div>
	</div>
</div>
<div id="coverdiv" style="z-index: 300;"></div>
<div id="wrap">
	<div id="header">
		<div id="header_left"></div>
		<div id="header_right"></div>
	</div>
	<div id="mid_header">
	<ul class="ul">显示用户名</ul>
	</div>
	<div id="content">
		<%@include file="/jsp/common/userLeftContent.jsp"%>
		<div class="rrcc" id="RightBox">
			<div class="center" id="Mobile" onclick="show_menuC()"></div>
			<div class="right" id="ContentBox">
			<div id="middle_content">
				<div class="first_box">
				  <ul class="u1">网络模型选择</ul>
				<ul class="u1">
			<select name="selectmodel" id="middle" onchange="selChange()">
				<option selected="selected" value="">-请选择-</option>
				<option value="bacontent" >BA模型</option>
				<option value="ercontent" >ER模型</option>
				<option value="bbvcontent" >BBV模型</option>
				<option value="wscontent" >WS模型</option>
				<option value="swbcontent" >社团网络</option>
			  </select>
				</ul>
				 <ul class="u1">
				   <label id="label_model"> </label> 
				  </ul>
				</div>
				<div class="middle_box" id="divparam" style="display:none">
				   <ul class="u1">网络特征值选择</ul>
				  <ul class="u1">
					<select name="selectpara" id="param" onchange="setLabel()">
					<option selected="selected" value="">-请选择-</option>
					  <option  value="avgDegree" >平均度</option>
					  <option  value="netDiameter" >网络直径</option>
					  <option value="modularity" >模块度</option>
					  <option value="avgDistance" >平均距离</option>
					  <option value="cluster">平均聚类系数</option>
					  <option value="distribution" >分布度</option>
					</select>
				  </ul>
				  <ul class="u1">
				   <label id="label_text"> </label> 
				  </ul>
				</div>
				<div class="last_box">
				   <ul class="u1">网络参数显示：</ul>
				  <ul class="u1">
				   <label id="label_num"> </label> 
				  </ul>
				   <ul class="u1">
				   <label id="label_edge"> </label> 
				  </ul>
				   <ul class="u1">
				   <label id="label_pos"> </label> 
				  </ul>
				</div>
				
			</div>
			<div id="right_content"><!--href="javascript:void(0);" onclick="setUrl()"-->
				<div class="first_right">网络模型图：
					<a  id="ba_link" style="display:none" href="user/showNetworkMax.action?networkFlag=baFlag" target="_blank">(在新窗口中打开)</a>
					<a  id="er_link" style="display:none" href="user/showNetworkMax.action?networkFlag=erFlag" target="_blank">(在新窗口中打开)</a>
					<a  id="bbv_link" style="display:none" href="user/showNetworkMax.action?networkFlag=bbvFlag" target="_blank">(在新窗口中打开)</a>
					<a  id="ws_link" style="display:none" href="user/showNetworkMax.action?networkFlag=wsFlag" target="_blank">(在新窗口中打开)</a>
					<a  id="swb_link" style="display:none" href="user/showNetworkMax.action?networkFlag=swbFlag" target="_blank">(在新窗口中打开)</a>				
				</div>
				 <!--此处较简单一些，应该能根据1.不同的网络显示不同的图形-->
				 <div class="last_right"id="grough">
			        <iframe  id="network" class="iframe" ></iframe>
				 </div>
			</div>
			<div id="last_content">
			     <div class="first_right">特征值曲线：
					 <a  id="avgDegree" style="display:none" href="user/showCurveMax.action?curveFlag=avgDegreeFlag" target="_blank">(在新窗口中打开)</a>
					 <a  id="avgDistance" style="display:none" href="avgDistance.html" target="_blank">(在新窗口中打开)</a>
					 <a  id="modularity" style="display:none" href="modularity.html" target="_blank">(在新窗口中打开)</a>
					 <a  id="distribution" style="display:none" href="distribution.html" target="_blank">(在新窗口中打开)</a>
					 <a  id="cluster" style="display:none" href="cluster.html" target="_blank">(在新窗口中打开)</a>
					 <a  id="netDiameter" style="display:none" href="user/showCurveMax.action?curveFlag=cruelFlag" target="_blank">(在新窗口中打开)</a>				 
				 </div>
				 <!--此处很麻烦，应该能根据1.不同的网络2.不同的特征值显示不同的图形，
				 只是在给后台传参时传的值较麻烦，
				 以计算平均度为例：后台不仅要把平均度传回给前台，而且必须把
				 网络图所包含的所有度、以及等于各个度数的节点个数传回给前台（显示特征曲线图形时要用）-->
				 <div class="last_right" id="feature">
				    <iframe  id="curve" class="iframe"></iframe>
				 </div>
		    </div>
			</div>
		</div>
	</div>	
	<div id="footer">版权声明</div>
</div>
</body>
</html>
